<div class="submenu">
	<div class="inner">
		<ul>
			<?php $cl = ''; $cl = ($this->router->method == 'billing_history') ? 'selected' : ''; ?>
			<li class="first <?php echo $cl; ?>"><?php echo anchor('/site/billing_history/', T_('Billing History'))?></li>
			<?php $cl = ''; $cl = ($this->router->method == 'credit_cards') ? 'selected' : ''; ?>
			<li class="<?php echo $cl; ?>"><?php echo anchor('/site/credit_cards/', T_('Credit cards information'))?></li>
			<?php $cl = ''; $cl = ($this->router->method == 'upgrade') ? 'selected' : ''; ?>
			<li class="<?php echo $cl; ?>"><?php echo anchor('/site/upgrade/', T_('Upgrade or downgrade account'))?></li>
			<?php $cl = ''; $cl = ($this->router->method == 'details') ? 'selected' : ''; ?>
			<li class="<?php echo $cl; ?>"><?php echo anchor('/site/details/', T_('User profile'))?></li>
		</ul>
	</div>
</div>

<div class="page_inner">

	<?php echo form_open($this->curl . '/create/', 'id="myform" name="myform" autocomplete="off"')?>
	<br />
	<table class="nostyle" width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<?php echo $this->validation->error_string?>
			<table class="nostyle forma" width="100%" border="0" cellpadding="3" cellspacing="0">
			<tr>
				<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->credit_cards_model->fields['card_type']?></th>
				<td>
					<div class="input_300">
						<?php echo form_dropdown('card_type', $this->config->item('credit_cards'), array($this->validation->card_type), null, TRUE)?>
					</div>
				</td>
			</tr>
			<tr>
				<th></th>
				<td>
					<div style="padding:1px 0 2px 0"><img src="/img/ico-info.gif" width="16" height="16" style="vertical-align:bottom" /><a target="_blank" href="/site/content/help"><?php echo T_('Don\'t see your card type?'); ?></a></div>
				</td>
			</tr>
			<tr>
				<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->credit_cards_model->fields['card_number']?></th>
				<td><div class="input_300"><?php echo form_input('card_number', $this->validation->card_number, 'class="input-text"')?></div></td>
			</tr>
			<tr>
				<th><?php $this->load->view('_elements/obligatory');?><?php echo T_('Expiration Date'); ?></th>
				<td>
					<div class="input_120" style="float: left;margin-right:10px">
						<?php echo form_dropdown('month_expired', $this->config->item('months'), array($this->input->post('month_expired')), null, FALSE)?>
					</div>
					<div class="input_80" style="float: left">
						<?php 
							$year_expired[0] = 'Year';
							$y = date('Y');
							for($i=$y+10; $i>=$y; $i--)
							{
								$year_expired[$i] = $i;
							}
						?>
						<?php echo form_dropdown('year_expired', $year_expired, array($this->input->post('year_expired')), null, FALSE)?>
					</div>
				</td>
			</tr>
			<tr>
				<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->credit_cards_model->fields['card_id_number']?></th>
				<td>
					<div class="input_120" style="float: left;margin-right:10px"><?php echo form_input('card_id_number', $this->validation->card_id_number, 'class="input-text"')?></div>
					<div style="float: left;padding-top:4px"><img src="/img/ico-info.gif" width="16" height="16" style="vertical-align:bottom" /><a href="javascript:void(0)"><?php echo T_('What\'s this?'); ?></a></div>
				</td>
			</tr>
			<tr>
				<th></th>
				<td>
					<strong><?php echo T_('Cardholder name'); ?></strong><?php echo T_('(as it appears on the card)'); ?><br />
					<table cellspacing="0" cellpadding="3" border="0" width="200" class="nostyle" id="points">
					<thead>
					<tr>
						<th><?php echo $this->credit_cards_model->fields['first_name'];?></th>
						<th><?php echo $this->credit_cards_model->fields['last_name'];?></th>
					</tr>
					</thead>
					<tbody>
					<tr>
						<td><div class="input_120"><?php echo form_input('first_name', $this->validation->first_name, 'class="input-text"')?></div></td>
						<td><div class="input_120"><?php echo form_input('last_name', $this->validation->last_name, 'class="input-text"')?></div></td>
					</tr>
					</tbody>
					</table>
				</td>
			</tr>
			<tr>
				<th><?php echo $this->credit_cards_model->fields['is_default_card']?></th>
				<td><?php echo form_checkbox('is_default_card', 1, ($this->input->post('is_default_card')) ? TRUE : FALSE, 'class="checkbox"')?></td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td></td>
				<td>			
					<input name="edit" type="submit" class="btn btn_save" id="submit" value="<?php echo T_('Submit')?>" />
					<input name="reset"  type="reset"  class="btn btn_clear" id="reset" value="<?php echo T_('Reset')?>" onclick="$('#create_form input[type=text]').val('');" />
				</td>
			</tr>
			</table>
		</td>
	</tr>
	</table>
	
	<?php echo form_close()?>	
</div>